<?php

namespace App\Http\Controllers\home;

use Illuminate\Http\Request;

use App\Http\Requests;
use App\Http\Controllers\Controller;
use DB;
class GoodCommentController extends Controller
{

    /**
     * 商品评论界面
     * 
     * @return    商品模板
     */
    public function getIndex()
    {
        return view('/home/goods_comment/commentlist');
    }

    /**
     * 商品评论提交模板
     */
    public function postDoadd(Request $request)
    {
        $arr = $request->except(['_token']);

        $res = DB::table('goods_comment') -> insert($arr);
        if($res){
            return back() -> with('success','商品评论成功');
        }else{
            return back() -> with('error','商品评论失败');
        }
    }
}
